/*
* Poppy Game Engine - https://pgetemplate.googlecode.com/svn/
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
*
* Copyright (c) 2008 Poppy
*/

#include "stdafx.h"
#include "CDirectCtrl.h"
#ifdef WIN32
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#endif
#ifdef PSP
#include <pspctrl.h>
#endif

namespace PGESystem
{

	#ifdef PSP
	typedef int (*UPDATE_FUNC)( SceCtrlData*, int );
	#endif

	class InputObject
	{

	public:

		#ifdef WIN32
		LPDIRECTINPUT8			m_pDInput;
		LPDIRECTINPUTDEVICE		m_pDevice[3];
		#endif
		#ifdef PSP

		#endif
	};

	bool CDirectCtrl::InitCtrl()
	{
		if( m_bIsinited ) return false;
		#ifdef WIN32
		#endif
		#ifdef PSP

		sceCtrlSetSamplingCycle(m_dCycle);
		if( m_dFlag & USE_ANALOG_ROCKER )
			sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
		else
			sceCtrlSetSamplingMode(PSP_CTRL_MODE_DIGITAL);

		#endif
		return false;
	}

	void CDirectCtrl::DestoryCtrl()
	{
		if( !m_bIsinited ) return;
		#ifdef WIN32
		#endif
	}

	void CDirectCtrl::UpdateCtrlState()
	{
		assert( m_bIsinited );
		#ifdef WIN32
		#endif
		#ifdef PSP



		#endif
	}

}
